package org.lynn.lambda.stream;

import lombok.Data;
import org.lynn.lambda.function.ConsumerInterface;

import java.util.List;

/**
 * @author linzou@linkdoc.com
 * @ClassName: MyStream
 * @Description:
 * @date 2019/6/27 11:00 AM
 */
@Data
public class MyStream<T> {

    private List<T> list;

    public void foreachMyData(ConsumerInterface<T> consumer) {

        for (T t : list) {
            consumer.accept(t);
        }

    }


}
